home *** CD-ROM | disk | FTP | other *** search
- #
- # This script was written by Renaud Deraison <deraison@cvs.nessus.org>
- #
- # See the Nessus Scripts License for details
- #
-
- if(description)
- {
- script_id(10149);
- script_bugtraq_id(816);
- script_version ("$Revision: 1.15 $");
- script_cve_id("CAN-1999-1527");
- name["english"] = "NetBeans Java IDE";
- name["francais"] = "NetBeans Java IDE";
-
- script_name(english:name["english"], francais:name["francais"]);
-
- desc["english"] = "
- The remote host is running NetBeans (recently renamed to
- Forte') Java IDE. There is a bug in this version that allows
- anyone to browse the files on this system.
-
-
- Solution : Set the HTTP server 'Enable' to FALSE in Project settings
- Risk factor : High";
-
- desc["francais"] = "
- Le systΦme distant fait tourner l'IDE Java NetBeans (renommΘ rΘcemment Forte')
- Il y a un problΦme dans cette version qui permet α n'importe qui
- de browser les fichiers prΘsents sur ce systΦme.
-
- Solution : Mettez le 'Enable' de HTTP Server α FAUX dans les project settings
- ";
-
- script_description(english:desc["english"], francais:desc["francais"]);
-
- summary["english"] = "determines whether the remote root directory is browseable";
- summary["francais"] = "determines whether the remote root directory is browseable";
- script_summary(english:summary["english"], francais:summary["francais"]);
-
- script_category(ACT_GATHER_INFO);
-
-
- script_copyright(english:"This script is Copyright (C) 1999 Renaud Deraison",
- francais:"Ce script est Copyright (C) 1999 Renaud Deraison");
- family["english"] = "Remote file access";
- family["francais"] = "AccΦs aux fichiers distants";
- script_family(english:family["english"], francais:family["francais"]);
- script_dependencie("find_service.nes", "httpver.nasl");
- script_require_ports("Services/www", 80, 8082);
- exit(0);
- }
-
- #
- # The script code starts here
- #
- include("http_func.inc");
-
- function netbeans(port)
- {
- if(get_port_state(port))
- {
- soc = http_open_socket(port);
- if(soc)
- {
- buffer = http_get(item:"/", port:port);
- send(socket:soc, data:buffer);
- data = http_recv(socket:soc);
- http_close_socket(soc);
- data_low = tolower(data);
- seek = "<title>index of /</title>";
- if(seek >< data_low)
- {
- if("netbeans" >< data_low) security_hole(port);
- }
- exit(0);
- }
- }
- }
-
- #
- # NetBeans might be running on another port.
- #
- netbeans(port:8082);
-
- port = get_http_port(default:80);
- if(!port)exit(0);
- if(!(port == 8082))
- {
- netbeans(port:port);
- }
-